// 创建一个路由器，并暴露出去
// 第一步：引入createRouter
import {createRouter,createWebHistory,createWebHashHistory} from 'vue-router'
// 引入一个一个可能要呈现组件
// import Home from '@/components/Home.vue'
import { staticRouter, errorRouter } from "@/routers/staticRouter";

const routerMode = {
  hash: () => createWebHashHistory(),
  history: () => createWebHistory()
};

const router = createRouter({
    history: routerMode['history'](),
    routes: [...staticRouter, ...errorRouter],
    strict: false,
    scrollBehavior: () => ({ left: 0, top: 0 })
});
export default router